<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<!-- Copyright 1997 The Open Group, All Rights Reserved -->
<title>uux</title>
</head><body bgcolor=white>
<center>
<font size=2>
The Single UNIX &reg; Specification, Version 2<br>
Copyright &copy; 1997 The Open Group

</font></center><hr size=2 noshade>
<h4><a name = "tag_001_014_2771">&nbsp;</a>NAME</h4><blockquote>
uux - remote command execution
</blockquote><h4><a name = "tag_001_014_2772">&nbsp;</a>SYNOPSIS</h4><blockquote>
<pre><code>

uux <b>[</b>-np<b>]</b><i> command-string</i>

uux <b>[</b>-jnp<b>]</b><i> command-string</i>

uux <b>[</b>-<b>][</b>-jn<b>]</b><i> command-string</i>
</code>
</pre>
</blockquote><h4><a name = "tag_001_014_2773">&nbsp;</a>DESCRIPTION</h4><blockquote>
The
<i>uux</i>
utility
will gather zero or more files from various systems, execute a
shell pipeline (see
<xref href=shcmds><a href="chap2.html#tag_001_009">
Shell Commands
</a></xref>)
on a specified system,
and then send the standard output of the command
to a file on a specified system.
Only the first command of a pipeline can have a
&quot;<i>system-name</i>!&quot;
prefix.
All other commands in the pipeline
are executed on the system of the first command.
<p>
The following restrictions are applicable
to the shell pipeline processed by
<i>uux</i>:
<ul>
<p>
<li>
In gathering files from different systems,
pathname expansion is not performed by
<i>uux</i>.
Thus, a request such as:
<pre>
<code>
uux "c89 remsys!~/*.c"
</code>
</pre>
would attempt to copy the file named literally <b>*.c</b> to the local system.
<p>
<li>
The redirection operators
<b>&gt;&gt;</b>,
<b>&lt;&lt;</b>,
<b>&gt;|</b>
and
<b>&gt;&amp;</b>
cannot be used.
<p>
<li>
The reserved word
<b>!</b>
cannot be used at the head of
the pipeline to modify the exit status.
<p>
<li>
Alias substitution is not performed.
<p>
</ul>
<p>
A filename can be specified as for
<i><a href="uucp.html">uucp</a></i>;
it can be an absolute pathname, a pathname preceded by
<i>~name</i>
(which is replaced by the corresponding
login directory), a pathname specified as
<i>~/dest</i>
(<i>dest</i>)
is prefixed by
the public directory called
<i>"PUBDIR"</i>;
the actual location of
<i>PUBDIR</i>
is implementation-dependent),
or a simple filename (which is prefixed by
<i>uux</i>
with the current directory).
See
<i><a href="uucp.html">uucp</a></i>
for the details.
<p>
The execution of commands on remote systems takes place in an
execution directory known to the
<i><a href="uucp.html">uucp</a></i>
system.
All files required for the execution will be put into this
directory unless they already reside on that machine.
Therefore, the non-local filenames (without path or machine
reference) must be unique within the
<i>uux</i>
request.
<p>
The
<i>uux</i>
utility will attempt to get all files to the execution system.
For files that are output files, the filename must be escaped using
parentheses.
<p>
The remote system will notify the user by mail
if the requested command on the remote
system was disallowed or the files were not accessible.
This notification can be turned off by the
<b>-n</b>
option.
<p>
Typical implementations of this utility require a communications
line configured to use the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> ,
but other communications means may be used.
On systems where there are no available communications means
(either temporarily or permanently), this
utility will write an error message describing the problem
and exit with a non-zero exit status.
<p>
The
<i>uux</i>
utility cannot guarantee support for all character encodings
in all circumstances.
For example,
transmission data may be restricted to 7-bits by the underlying
network, 8-bit data and filenames need not be portable to
non-internationalised systems, and so on.
Under these circumstances, it is recommended that only
characters defined in the
ISO/IEC&nbsp;646:1991 standard International Reference Version
(equivalent to ASCII) 7-bit range of
characters be used and that only characters defined in the Portable
Filename Character Set be used for naming files.
</blockquote><h4><a name = "tag_001_014_2774">&nbsp;</a>OPTIONS</h4><blockquote>
The
<i>uux</i>
utility supports the <b>XBD</b> specification, <a href="../xbd/utilconv.html#usg"><b>Utility Syntax Guidelines</b>&nbsp;</a> ,
except that - is supported as an option
in the obsolescent version,
rather than an operand.
The following options are supported:
<dl compact>

<dt><b>-p</b>
<dd>
<dt><b>-</b><dd>Make the standard input to
<i>uux</i>
the standard input to the
<i>command-string</i>.


<dt><b>-j</b>
<dd>Write the job identification
string to standard output.
This job identification can be used by
<i><a href="uustat.html">uustat</a></i>
to obtain the status or terminate a job.

<dt><b>-n</b>
<dd>Do not notify the user if the command fails.

</dl>
</blockquote><h4><a name = "tag_001_014_2775">&nbsp;</a>OPERANDS</h4><blockquote>
The following operands are supported:
<dl compact>

<dt><i>command-string</i><dd>
A string made up of one or more arguments that
are similar to normal command arguments,
except that the command and any filenames
can be prefixed by
&quot;<i>system-name</i>!&quot;
A null
<i>system-name</i>
is interpreted as the local system.

</dl>
</blockquote><h4><a name = "tag_001_014_2776">&nbsp;</a>STDIN</h4><blockquote>
The standard input is not used unless the
- or
<b>-p</b>
option is specified; in those cases, the
standard input is made the standard input of the
<i>command-string</i>.
</blockquote><h4><a name = "tag_001_014_2777">&nbsp;</a>INPUT FILES</h4><blockquote>
Input files are selected according to the contents of
<i>command-string</i>.
</blockquote><h4><a name = "tag_001_014_2778">&nbsp;</a>ENVIRONMENT VARIABLES</h4><blockquote>
The following environment variables affect the execution of
<i>uux</i>:
<dl compact>

<dt><i>LANG</i><dd>Provide a default value for the internationalisation variables
that are unset or null.
If
<i>LANG</i>
is unset or null, the corresponding value from the
implementation-dependent default locale will be used.
If any of the internationalisation variables contains an invalid setting, the
utility will behave as if none of the variables had been defined.

<dt><i>LC_ALL</i><dd>
If set to a non-empty string value,
override the values of all the other internationalisation variables.

<dt><i>LC_CTYPE</i><dd>
Determine the
locale for the interpretation of sequences of bytes of text data as
characters (for example, single- as opposed to multi-byte characters
in arguments).

<dt><i>LC_MESSAGES</i><dd>
Determine the locale that should be used to affect
the format and contents of diagnostic
messages written to standard error.

<dt><i>NLSPATH</i><dd>
Determine the location of message catalogues
for the processing of
<i>LC_MESSAGES .
</i>
</dl>
</blockquote><h4><a name = "tag_001_014_2779">&nbsp;</a>ASYNCHRONOUS EVENTS</h4><blockquote>
Default.
</blockquote><h4><a name = "tag_001_014_2780">&nbsp;</a>STDOUT</h4><blockquote>
The standard output is not used unless the
<b>-j</b>
option is specified; in that case, the job
identification string is written to standard
output in the following format:
<p><code>
<tt>"%s\n"</tt>, &lt;<i>jobid</i>&gt;
</code>
</blockquote><h4><a name = "tag_001_014_2781">&nbsp;</a>STDERR</h4><blockquote>
Used only for diagnostic messages.
</blockquote><h4><a name = "tag_001_014_2782">&nbsp;</a>OUTPUT FILES</h4><blockquote>
Output files are created or written, or both, according to the contents of
<i>command-string</i>.
<p>
If the
<b>-n</b>
is not used, mail files will be modified
following any command or file-access failures
on the remote system.
</blockquote><h4><a name = "tag_001_014_2783">&nbsp;</a>EXTENDED DESCRIPTION</h4><blockquote>
None.
</blockquote><h4><a name = "tag_001_014_2784">&nbsp;</a>EXIT STATUS</h4><blockquote>
The following exit values are returned:
<dl compact>

<dt>0<dd>Successful completion.

<dt>&gt;0<dd>An error occurred.

</dl>
</blockquote><h4><a name = "tag_001_014_2785">&nbsp;</a>CONSEQUENCES OF ERRORS</h4><blockquote>
Default.
</blockquote><h4><a name = "tag_001_014_2786">&nbsp;</a>APPLICATION USAGE</h4><blockquote>
Note that, for security reasons, many installations will
limit the list of
commands executable on behalf of an incoming request from
<i>uux</i>.
Many sites will permit little more than
the receipt of mail via
<i>uux</i>.
<p>
Any characters special to the command interpreter should be quoted either
by quoting the entire
<i>command-string</i>
or quoting the special characters as individual arguments.
<p>
As noted in
<i><a href="uucp.html">uucp</a></i>,
shell pattern matching notation
characters appearing in pathnames are expanded on the
appropriate local system.
This is done under the control of local settings of
<i>LC_COLLATE</i>
and
<i>LC_CTYPE .
</i>Thus, care should be taken when using bracketed
filename patterns, as collation and typing rules may vary from one
system to another.
Also be aware that certain types of expression
(that is, equivalence classes, character classes and collating
symbols) need not be supported on non-internationalised systems.
</blockquote><h4><a name = "tag_001_014_2787">&nbsp;</a>EXAMPLES</h4><blockquote>
<ol>
<p>
<li>
The following command gets
<i>file1</i>
from system
<b>a</b>
and
<i>file2</i>
file from system
<b>b</b>,
executes
<i><a href="diff.html">diff</a></i>
on the local system,
and puts the results in
<b>file.diff</b>
in the local
<i>PUBDIR</i>
directory.
(<i>PUBDIR</i>
is the
<i><a href="uucp.html">uucp</a></i>
public directory on the local system.)
<pre>
<code>
uux "!diff a!/usr/file1 b!/a4/file2 &gt;!~/file.diff"
</code>
</pre>
<p>
<li>
The following command will fail because
<i>uux</i>
places all files copied to a system
in the same working directory.
Although the files
<b>xyz</b>
are from two different systems, their filenames are the same
and will conflict.
<pre>
<code>
uux "!diff a!/usr1/xyz b!/usr2/xyz &gt;!~/xyz.diff"
</code>
</pre>
<p>
<li>
The following command will succeed (assuming
<i><a href="diff.html">diff</a></i>
is permitted on system
<b>a</b>)
because the file local to system
<b>a</b>
is not copied to the
working directory, and hence does not conflict the file
from system
<b>c</b>.
<pre>
<code>
uux "a!diff a!/usr/xyz c!/usr/xyz &gt;!~/xyz.diff"
</code>
</pre>
<p>
</ol>
</blockquote><h4><a name = "tag_001_014_2788">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>
A version of
<i>uux</i>
that fully supports the <b>XBD</b> specification, <a href="../xbd/utilconv.html#usg"><b>Utility Syntax Guidelines</b>&nbsp;</a>  may be
introduced in a future issue.
</blockquote><h4><a name = "tag_001_014_2789">&nbsp;</a>SEE ALSO</h4><blockquote>
<i><a href="uucp.html">uucp</a></i>,
<i><a href="uuencode.html">uuencode</a></i>,
<i><a href="uustat.html">uustat</a></i>.
</blockquote><hr size=2 noshade>
<center><font size=2>
UNIX &reg; is a registered Trademark of The Open Group.<br>
Copyright &copy; 1997 The Open Group
<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]

</font></center><hr size=2 noshade>
</body></html>
